package com.lock.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;


@Mapper
public interface StockDao {
    @Select("select num from tbl_stock where productid=#{productid}")
    int findById(Integer productid);

    @Update("update tbl_stock set num=num-1 where productid=#{productid} ")
    void update(Integer productid);
}
